package com.pro.common.service.admin.enums;

import com.pro.framework.api.enums.IEnumStr;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum EnumExecutorRouteStrategy implements IEnumStr {
    FIRST(0, "第一个", "default"),
    LAST(1, "最后一个", "default"),
    ROUND(2, "轮询", "primary"),
    RANDOM(3, "随机", "primary"),
    CONSISTENT_HASH(4, "一致性哈希", "info"),
    ;

    private final Integer value;
    private final String label;
    private final String color;

//    public static final Map<Integer, EnumExecutorRouteStrategy> MAP = IEnumInt.getMap(values());
//
//    @Override
//    public EnumExecutorRouteStrategy fromValueMap(Integer value) {
//        return MAP.get(value);
//    }
}
